<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>myblog</title>
<link rel="stylesheet" href="stylesheets/style.css">
</head>
<body>

<header>
<h1><%= title %></h1>
</header>

<nav>
<span><a title="主页" href="/">home</a></span>
<% if(locals.user){ %>
	<span><a title="发表" href="/article">article</a></span>
	<span><a title="注册" href="/logout">logout</a></span>
<% }else { %>
	<span><a title="登录" href="/login">login</a></span>
	<span><a title="注册" href="/reg">register</a></span>
<% } %>
</nav>

<article>
<% if(locals.success) {%>
	<div><%= locals.success %></div>
<% } %>
<% if(locals.error) {%>
	<div><%= locals.error %></div>
<% } %>